/*
*************************************************************************
*西瑞克斯研发管理系统
*版 本: 1.0   
*日 期：03/01/2012    
*作 者： 王浩 QQ：873987060   
*************************************************************************   
*/  

package com.application.yfsyslog.struts.form;
import org.apache.commons.lang.builder.ReflectionToStringBuilder;
import org.apache.commons.lang.builder.ToStringStyle;
import javax.servlet.http.HttpServletRequest;
import org.apache.struts.action.ActionErrors;
import org.apache.struts.action.ActionForm;
import org.apache.struts.action.ActionMapping;

import java.util.Calendar;
import java.util.List;
import com.manager.commons.StringUtil;
import com.application.yfsyslog.entity.YfSyslog;
import java.util.Date;
 /**
 * 
 * Description: YfSyslogForm Struts Action Form<br />
 * 
 * Version:V0.1<br />
 * 
 * Author: 王浩 QQ：873987060 <br />
 * 
 * History: <br />
 * 
 * 03/01/2012 .
 * 
 */
public class  YfSyslogForm extends ActionForm
{

	/** serialVersionUID */
	protected static final long serialVersionUID = -1L;
	
	public YfSyslogForm(){
  
	}

		      
	private String id;
        
        	      
	private String userId;
        
        	      
	private Date loginTime;
        
        	      
	private Date outTime;
        
        	      
	private String mac;
        
        	      
	private String ip;
        
        	      
	private String org;
        
        	      
	private String operateid;
        
        	      
	private Date createDate;
	
	private Date startDate;
	
	private Date endDate;
    
	private String startDateStr;
	
	private String endDateStr;
	
	private String rname;
        
        private String ids;

	                                        
	                        	private String loginTimeStr;
                        	private String outTimeStr;
                                                                        
	
         	         	 	/**
	 * @return Returns the LoginTime.
	 */
	public String getLoginTimeStr(){
	        String re = "";
		if(this.loginTime == null) {
			return re;
		}
		try {
			re = StringUtil.dateToString(this.loginTime);
		}
		catch(Exception e) {
			e.printStackTrace();
		}
		return re;
	}
	

	/**
	 * @param ${field.propertyName} Set the ${field.propertyName}.
	 */	
	public void setLoginTimeStr(String loginTimeStr){
		this.loginTimeStr = loginTimeStr;
		if(this.loginTimeStr != null && !"".equals(this.loginTimeStr)) {
			try {
				this.loginTime = StringUtil.stringToDate(this.loginTimeStr);
			}
			catch(Exception e) {
				e.printStackTrace();
			}
		}

	}
                	 	/**
	 * @return Returns the OutTime.
	 */
	public String getOutTimeStr(){
	        String re = "";
		if(this.outTime == null) {
			return re;
		}
		try {
			re = StringUtil.dateToString(this.outTime);
		}
		catch(Exception e) {
			e.printStackTrace();
		}
		return re;
	}
	

	/**
	 * @param ${field.propertyName} Set the ${field.propertyName}.
	 */	
	public void setOutTimeStr(String outTimeStr){
		this.outTimeStr = outTimeStr;
		if(this.outTimeStr != null && !"".equals(this.outTimeStr)) {
			try {
				this.outTime = StringUtil.stringToDate(this.outTimeStr);
			}
			catch(Exception e) {
				e.printStackTrace();
			}
		}

	}
                	         	         	         

        	/**
	 * @return Returns the Id
	 */
	public String getId(){
		return this.id;
	}
	

	/**
	 * @param id Set the id.
	 */	
	public void setId(String id){
		this.id = id;
	}
	
        	/**
	 * @return Returns the UserId
	 */
	public String getUserId(){
		return this.userId;
	}
	

	/**
	 * @param userId Set the userId.
	 */	
	public void setUserId(String userId){
		this.userId = userId;
	}
	
        	/**
	 * @return Returns the LoginTime
	 */
	public Date getLoginTime(){
		return this.loginTime;
	}
	

	/**
	 * @param loginTime Set the loginTime.
	 */	
	public void setLoginTime(Date loginTime){
		this.loginTime = loginTime;
	}
	
        	/**
	 * @return Returns the OutTime
	 */
	public Date getOutTime(){
		return this.outTime;
	}
	

	/**
	 * @param outTime Set the outTime.
	 */	
	public void setOutTime(Date outTime){
		this.outTime = outTime;
	}
	
        	/**
	 * @return Returns the Mac
	 */
	public String getMac(){
		return this.mac;
	}
	

	/**
	 * @param mac Set the mac.
	 */	
	public void setMac(String mac){
		this.mac = mac;
	}
	
        	/**
	 * @return Returns the Ip
	 */
	public String getIp(){
		return this.ip;
	}
	

	/**
	 * @param ip Set the ip.
	 */	
	public void setIp(String ip){
		this.ip = ip;
	}
	
        	/**
	 * @return Returns the Org
	 */
	public String getOrg(){
		return this.org;
	}
	

	/**
	 * @param org Set the org.
	 */	
	public void setOrg(String org){
		this.org = org;
	}
	
        	/**
	 * @return Returns the Operateid
	 */
	public String getOperateid(){
		return this.operateid;
	}
	

	/**
	 * @param operateid Set the operateid.
	 */	
	public void setOperateid(String operateid){
		this.operateid = operateid;
	}
	
        	/**
	 * @return Returns the CreateDate
	 */
	public Date getCreateDate(){
		return this.createDate;
	}
	

	/**
	 * @param createDate Set the createDate.
	 */	
	public void setCreateDate(Date createDate){
		this.createDate = createDate;
	}
	
                
        
	                                

	private List<YfSyslog> yfSyslogList;

       /**
	 * @return the yfsyslogformList
	 */
	public List<YfSyslog> getYfSyslogList() {
		return yfSyslogList;
	}

	/**
	 * @param yfSyslogList the yfsyslogformList to set
	 */
	public void setYfSyslogList(List<YfSyslog> yfSyslogList) {
		this.yfSyslogList = yfSyslogList;
	}
        
	public String getIds() {
		return ids;
	}

	public void setIds(String ids) {
		this.ids = ids;
	}

	/** 
	 * Method validate
	 * @param mapping
	 * @param request
	 * @return ActionErrors
	 */
	public ActionErrors validate(ActionMapping mapping,
			HttpServletRequest request) {
		// TODO Auto-generated method stub
		return null;
	}

	/** 
	 * Method reset
	 * @param mapping
	 * @param request
	 */
	public void reset(ActionMapping mapping, HttpServletRequest request) {
		// TODO Auto-generated method stub
	}

        public String toString(){
		return ReflectionToStringBuilder.toString(this,ToStringStyle.MULTI_LINE_STYLE);
	}


		public String getRname() {
			return rname;
		}


		public void setRname(String rname) {
			this.rname = rname;
		}


		public Date getStartDate() {
			return startDate;
		}


		public void setStartDate(Date startDate) {
			this.startDate = startDate;
		}


		public Date getEndDate() {
			return endDate;
		}


		public void setEndDate(Date endDate) {
			this.endDate = endDate;
		}


		public String getStartDateStr() {
			return startDateStr;
		}


		public void setStartDateStr(String startDateStr) {
			this.startDateStr = startDateStr;
			if(this.startDateStr != null && !"".equals(this.startDateStr)) {
				try {
					this.startDate = StringUtil.stringToDate(this.startDateStr);
				}
				catch(Exception e) {
					e.printStackTrace();
				}
			}
		}


		public String getEndDateStr() {
			return endDateStr;
		}


		public void setEndDateStr(String endDateStr) {
			this.endDateStr = endDateStr;
			if(this.endDateStr != null && !"".equals(this.endDateStr)) {
				try {
					Calendar c = Calendar.getInstance();
					this.endDate = StringUtil.stringToDate(this.endDateStr);
					c.setTime(endDate);
					c.add(Calendar.DAY_OF_MONTH, 1);
					this.endDate = c.getTime();
				}
				catch(Exception e) {
					e.printStackTrace();
				}
			}
		}
}
